import java.util.ArrayDeque;
import java.util.PriorityQueue;


public class SeatByGroupSize implements SeatingStrategy{

	public PriorityQueue<Integer> peopleInLine = new PriorityQueue<Integer>();
	@Override
	public int seat() {
		
		return peopleInLine.remove();
	}

	@Override
	public void add(int i) {
		
		peopleInLine.add(i);
		
	}

	@Override
	public int getSizeOfNextParty() {
		
		return peopleInLine.peek();
	}
	

}
